package com.omiis.wechat.performance_test2;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.apache.commons.io.FileUtils;

public class MessageUtil {

	private static List<String> txtMessages = new ArrayList<>();

	public static void main(String[] args) {
		System.out.println(getTxtMessages());
	}

	public static List<String> getTxtMessages() {
		loadTxtMessage();
		return txtMessages;
	}

	private static void loadTxtMessage() {
		String message = null;
		try {
			message = FileUtils.readFileToString(new File("./config/message.txt"));
		} catch (IOException e) {
			e.printStackTrace();
		}
		txtMessages.addAll(Arrays.asList(message.split("，")));
	}
}
